import java.util.Random;

public class TestMethod7 {
    public static void main(String[] args) {
        int result = getRandom();
        System.out.println("result = " + result);
    }
    //功能：随机产生一个[0-100)范围的整数
    public static int getRandom(){//有返回值无参数
        Random r=new Random();
        return r.nextInt(100);
    }
}
